package rollercoaster.commons;

import rollercoaster.commons.interfaces.Surface3D;
import rollercoaster.commons.interfaces.TextureCoordinateEvaluator;


public class HomogeneousTextureCoordinatesEvaluator implements TextureCoordinateEvaluator{

	public Vertex2D evaluateTextureCoordinates(Surface3D surface, float u, float v){
		return new Vertex2D(u/(surface.getEndUPoint()-surface.getStartUPoint()), v/(surface.getEndVPoint()-surface.getStartVPoint()));
	}
}
